class Solution {//leetcode991——坏了的计算器
public:
    int brokenCalc(int startValue, int target) {
        int cnt=0;
        while(startValue<target){
            if(target%2==0) target/=2;
            else target+=1;
            cnt++;
        }

        return cnt+startValue-target;
    }
};